package com.example.kechengsheji;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class zhuce extends Activity {

    private Button button;
    //private Button readButton;
    private EditText account;
    private EditText password;
    String TAG = ".chuishi";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.chushi);

        button = (Button) findViewById(R.id.button);
        account = (EditText) findViewById(R.id.account);
        password = (EditText) findViewById(R.id.passeord);

        button.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                SharedPreferences.Editor editor = getSharedPreferences("data", MODE_PRIVATE).edit();
                editor.putString("name", account.getText().toString());
                editor.putString("password", password.getText().toString());
                editor.commit();
                finish();
                Intent intent=new Intent(zhuce.this, denglu.class);
                startActivity(intent);
            }
        });
    }

}